package com.raycloud.erp.omll.data.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 平台交易信息
 * </p>
 *
 * @author 枫伦
 * @since 2021-01-05
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "Trade对象", description = "平台交易信息")
public class Trade implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键ID，自增")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "订单来源")
    private String source;

    @ApiModelProperty(value = "公司id")
    private Long companyId;

    @ApiModelProperty(value = "用户id")
    private Long userId;

    @ApiModelProperty(value = "平台订单ID")
    private String tid;

    @ApiModelProperty(value = "实付金额。单位分。100==1元")
    private Long payment;

    @ApiModelProperty(value = "运费")
    private Long postFee;

    @ApiModelProperty(value = "链接图片地址")
    private String picUrl;

    @ApiModelProperty(value = "分阶段付款的订单状态")
    private String stepTradeStatus;

    @ApiModelProperty(value = "卖家实际收到的支付宝打款金额（由于子订单可以部分确认收货，这个金额会随着子订单的确认收货而不断增加，交易成功后等于买家实付款减去退款金额）。精确到2位小数;单位:元。如:20007，表示:200元7分")
    private Long receivedPayment;

    @ApiModelProperty(value = "查询系统优惠系统优惠金额，精确到2位小数，单位：元。如：20007，表示：200元7分")
    private Long discountFee;

    @ApiModelProperty(value = "商品金额（商品价格乘以数量的总金额）。精确到2位小数;单位:元。如:20007，表示:200元7分")
    private Long totalFee;

    @ApiModelProperty(value = "卖家手工调整金额，精确到2位小数，单位：元。如：20007，表示：200元7分")
    private Long adjustFee;

    @ApiModelProperty(value = "判断订单是否有买家留言，有买家留言返回true，否则返回false")
    private Boolean hasBuyerMessage;

    @ApiModelProperty(value = "买家留言信息")
    private String buyerMessage;

    @ApiModelProperty(value = "买家昵称")
    private String buyerNick;

    @ApiModelProperty(value = "卖家昵称")
    private String sellerNick;

    @ApiModelProperty(value = "卖家备注（只有卖家才能查看该字段）")
    private String sellerMemo;

    @ApiModelProperty(value = "卖家备注旗帜（与淘宝网上订单的卖家备注旗帜对应，只有卖家才能查看该字段）红、黄、绿、蓝、紫 分别对应 1、2、3、4、5")
    private Boolean sellerFlag;

    @ApiModelProperty(value = "订单类型，一口价，预售，等")
    private String type;

    @ApiModelProperty(value = "交易创建时间。")
    private Date platformCreated;

    @ApiModelProperty(value = "交易修改时间(用户对订单的任何修改都会更新此字段)")
    private Date platformModified;

    @ApiModelProperty(value = "卖家发货时间。")
    private Date consignTime;

    @ApiModelProperty(value = "付款时间。格式:yyyy-MM-dd HH:mm:ss。订单的付款时间即为物流订单的创建时间。")
    private Date payTime;

    @ApiModelProperty(value = "交易状态")
    private String status;

    @ApiModelProperty(value = "交易结束时间。交易成功时间(更新交易状态为成功的同时更新)/确认收货时间或者交易关闭时间 。")
    private Date endTime;

    @ApiModelProperty(value = "收货人的姓名")
    private String receiverName;

    @ApiModelProperty(value = "收货人的所在省份")
    private String receiverState;

    @ApiModelProperty(value = "收货人的详细地址")
    private String receiverAddress;

    @ApiModelProperty(value = "收货人的邮编")
    private String receiverZip;

    @ApiModelProperty(value = "收货人的移动电话")
    private String receiverMobile;

    @ApiModelProperty(value = "收货人的手机")
    private String receiverPhone;

    @ApiModelProperty(value = "收货人街道地址")
    private String receiverTown;

    @ApiModelProperty(value = "收货人国籍")
    private String receiverCountry;

    @ApiModelProperty(value = "收货人的所在城市")
    private String receiverCity;

    @ApiModelProperty(value = "收货人的所在地区")
    private String receiverDistrict;

    @ApiModelProperty(value = "订单发货的快递公司名称")
    private String logisticsCompany;

    @ApiModelProperty(value = "订单所在包裹的运单号")
    private String invoiceNo;

    @ApiModelProperty(value = "创建时间")
    private Date created;

    @ApiModelProperty(value = "修改时间")
    private Date modified;

    @ApiModelProperty(value = "数据状态 1：有效 0：无效")
    private Boolean enableStatus;


}
